<template>
  <div id="mapviews">

  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
import maptalks from "./maptalks";
@Component
export default class extends Vue {
  public func(val: any, path: string): void {
    // 点击触发事件
    // console.log(val.target.options.other);
    // console.log(path);
  }
  private mounted(): void {
    var mapviews = new maptalks("mapviews");
    var data1 = [
      {
        prjNo: "667",
        prjName: "220kv姚家变电站 ",
        longitude: "120.9982058203125",
        latitude: "37.58792616793",
      },
    ];
    var data2 = [
      {
        prjNo: "101",
        prjName: "220kv姚家变电站2 ",
        longitude: "117.0980593359375",
        latitude: "36.773897809347545",
      },
    ];
    mapviews.addnormal(data1);
    mapviews.addnormal(data2);
    mapviews.addClickEvent(this.func);
  }
}
</script>

<style lang="scss" scoped>
#mapviews {
  width: 100%;
  height: 100%;
}
</style>

